package kbl.language;

public class TestNFA {
	public static NFAState getNFS(){
		NFA nfa = NFA.getInstance();
		NFAState s1 = new Match(nfa, "test");
		NFAState s5 = new Match(nfa, "test");
		NFAState s6 = new Match(nfa, "test");
		NFAState s4 = new Match(nfa, "test");
		
		NFAState s01 = new NFAState(nfa,'S');
		s01.setOut(s1);

		NFAState s04 = new NFAState(nfa,'d');
		s04.setOut(s4);

		NFAState s05 = new NFAState(nfa,'C');
		s05.setOut(s5);

		NFAState s06 = new NFAState(nfa,'C');
		s06.setOut(s6);

		NFAState s364 = new NFAState(nfa);
		s364.setOut(s06);
		s364.setAltout(s04);

		NFAState s3 = new NFAState(nfa,'c');
		
		NFAState s33 = new NFAState(nfa);
		s33.setOut(s3);
		s33.setAltout(s364);

		s3.setOut(s33);
		
		NFAState s254 = new NFAState(nfa);
		s254.setOut(s05);
		s254.setAltout(s04);

		NFAState s23 = new NFAState(nfa);
		s23.setAltout(s254);
		s23.setOut(s3);

		NFAState s2 = new NFAState(nfa,'C');
		s2.setOut(s23);
		
		NFAState s041 = new NFAState(nfa);
		s041.setOut(s04);
		s041.setAltout(s01);
		
		NFAState s023 = new NFAState(nfa);
		s023.setOut(s2);
		s023.setAltout(s3);

		NFAState s0 = new NFAState(nfa);
		s0.setAltout(s023);
		s0.setOut(s041);
		
		
		return s0;
		
	}
}
